package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.pojo.Student;
import com.itheima.pojo.StudentQueryParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface StudentMapper extends BaseMapper<Student> {

    // 自定义分页查询（条件查询）
    Page<Student> findStudent(Page<Student> page, @Param("qo") StudentQueryParam queryParam);

    // 自定义批量删除
    void deleteStudent(@Param("ids") List<Integer> ids);

    // 自定义违规处理
    void violation(@Param("id") Integer id, @Param("score") Integer score);

    // 统计数据
    List<Map<String, Object>> getStudentCountData();

    // 统计学历
    List<Map<String, Object>> countStudentDegree();
}